Skip to content

Conversation

lefkarag
Copy link
Contributor

Run a pre destroy hook and delete the vpc peering using a script.

Copy link
Contributor

@deki deki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setup-vpc-peering.sh was already a hacky solution and instead of adding more debt to it, I'd recommend to move the peering connection to CDK or CloudFormation so people can just delete the stack as part of the destroy.

It's fine to have an additional stack for now that just imports the values and creates/ accepts the peering connection and creates the routes. CDK doesn't have a L2 construct as of today (aws/aws-cdk#9338), so either CfnVPCPeeringConnection or AWS::EC2::VPCPeeringConnection in plain CloudFormation would be the way to go here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants